helloprojectfandomcom-20200222-history
User blog:JoshuaJSlone/Using Familytree
Today I've spent some time trying to figure out the Familytree template, which has documentation that I think is a bit lacking. The end code can also be pretty ugly, so it's hard to just look at an example and see how it works. I still haven't done a super complicated one, but I think I've now got the gist of how to design them without going too crazy, and should give you a good start. First off, you've got to determine the size of the tree you're making. The template thinks of spaces in terms of blocks, either an empty block or a space for a name which takes up 3 blocks of width. So you must base this on whichever row will have the most people. 1 person, 3 blocks of width. 2 people, 7 blocks of width. 3 people, 10 blocks of width--increasing by 4 each time. For height, you'll need 1 row for each generation of people, plus 1 between each for connecting lines. 1 generation, 1 row. 2 generations, 3 rows. 3 generations, 5 rows--increasing by 2 each time. As demonstration, let's recreate the family tree of Okai Chisato going step by step. It has 2 generations, which means we want 3 rows. In width we want 19 blocks, as there are 5 siblings. So 19x3. Now what do we do with this? results in (an invisible tree) There's a blank family tree with 19x3 blocks. Remember the _ to end each row. Each space between the | characters is a block. You may remember I said a name takes 3 blocks of width. The easy way to use this while setting up a tree while keeping everything straight is to use a shortened version of the name as I show below. As long as you're using a fixed width font (the editor here is that way for me), this will keep the row lengths the same as they were above, which is important for the moment. For the row with all the siblings it's easy to space things correctly since the entire row will be used--the rows with less, you'll just need to figure out the right spot to put them in, usually near the center. results in Now we have all the names showing up, and need to add the connecting lines. The family tree template page has an exhaustive list (that I think is a bit hard to read), but here are some important ones: ~''' for a dotted connection between couples. '''y for where the dotted connections meet and point down to the next generation. !' for a line going straight down. '^ for a horizontal line with a vertical pointing up from the center. v''' for the opposite, a horizontal line with a veritcal pointing down from the center. '''+ for, well, a plus shape. ,' for a downward bend at the left side of a group of siblings, and '. for its counterpart on the right side. '-' as a straight horizontal line, usually used between the other ones. Really it will very much depand on what types of connections and how many family members there are which you'll need. Below I've added the appropriate ones for the Okai family. results in This is why keeping every row the same character length was important--it makes it pretty easy to see where everything really is in relation to each other, and decide which connecting shapes to use. Now that we see the tree is shaped as it should be, we can replace each piece of text with a longer version, include a link, whatever. The formatting will remain the same, but now that the rows will be different lengths it will be MUCH harder for us as humans to interpret the code, which is why we save this for last. results in Category:Blog posts